import { listProductionAppeals } from '@/api/workorder'
export default {
  hasPage: true,
  request: (params) => {
    return listProductionAppeals(params)
  },
  dataParse: (res) => {
    const resData = res.data.data
    const data = {
      list: resData.rows.map(item=> {
        return {
          ...item,
          children: item.workProductionAppeals
        }
      }),
      total: resData.total
    }
    return data
  },
  columns: [
    {
      prop: 'xmbzNo',
      label: '后台单号',
      width: '200px',
    },
    {
      prop: 'cityName',
      label: '城市',
    },
    {
      prop: 'warehouseName',
      label: '生产站',
    },
    {
      prop: 'goodsName',
      label: '蛋糕款式',
    },
    {
      prop: 'responsibleDepartmentErrorText',
      label: '部门失误类型',
    },
    {
      prop: 'warehousingTime',
      label: '入库时间',
    },
    {
      prop: 'operator',
      label: '申诉人',
    },
    {
      prop: 'createTime',
      label: '申诉时间',
    },
    {
      prop: 'complaintContent',
      label: '申诉原因说明',
    },
    {
      prop: 'appealImgs',
      label: '申诉证明材料',
      isSlot: true,
      width: '140px',
    },
    {
      prop: 'personDispose',
      label: '审核人',
    },
    {
      prop: 'processingResults',
      label: '处理结果',
    },
    {
      prop: 'handleImgs',
      label: '处理凭证',
      isSlot: true,
      width: '140px',
    },
    {
      prop: 'handleState',
      label: '处理状态',
      isSlot: true,
    },
    {
      prop: 'operate',
      label: '操作',
      isSlot: true,
      width: '120px',
    }
  ]
}